#ifndef GAMEBOARD_H
#define GAMEBOARD_H

#include <QGraphicsView>

class QGraphicsScene;
class QGraphicsEllipseItem;

class GameBoard : public QGraphicsView {
    Q_OBJECT
public:
    explicit GameBoard(QWidget *parent = nullptr);
    void movePlayer(int playerId, int position);
    void reset();
    void setPlayerVisible(int playerId, bool visible);

private:
    QGraphicsScene* m_scene;
    QGraphicsEllipseItem* m_players[3];

    const int GRID_SIZE = 60;
    const int BOARD_SIZE = 9;

    QPointF calculatePosition(int pos) const;
    void createGrid();
};

#endif // GAMEBOARD_H
